<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看</title>
<link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body> 

<h1 class="page-header">测评指标体系 - 管理</h1>

<a href="javascript:;" class="btn btn-default btn-xs" onclick="$('#model').modal('show')"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span>&nbsp;添加</a>
<#--<form class="form-inline" action="" method="post">
  <div class="form-group">
    <label>姓名：</label>
    <input type="text" class="form-control input-sm" placeholder="搜索姓名" name="name" value="">
  </div>
  <button type="submit" class="btn btn-default btn-xs">搜索</button>
  <a href="" class="btn btn-default btn-xs">查看全部</a>
</form>-->

<table class="table table-striped table-bordered">
	<#list list as i>
<tr>
	<td colspan="4">问题：${i.content}
		<form action="/standard/del/${i.id}" form-ajax style="display: inline" method="POST" forward="/standard">
			<button class="btn btn-danger btn-xs" type="submit">删除</button>
		</form>
	</td>
</tr>
<tr>
	<td><span class="text-success">选项</span></td>
	<td>${i.q1}</td>
	<td>${i.q2}</td>
	<td>${i.q3}</td>
</tr>
<tr>
    <td><span class="text-success">建议</span></td>
	<td>${i.a1}</td>
	<td>${i.a2}</td>
	<td>${i.a3}</td>
</tr>
	</#list>
</table>
<div id="pager"></div>


<div class="modal fade" tabindex="-1" role="dialog" id="model" >
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">添加问题</h4>
            </div>
            <form action="" method="post" form-ajax forward="/standard">
            <div class="modal-body">

                    <div class="radio">
                        <label><input type="radio" name="type" id="" value="teacher" checked="checked" onclick="$('#t2').hide();$('#t1').show()">评价学生</label>
                        <label><input type="radio" name="type" id="" value="student" onclick="$('#t2').show();$('#t1').hide()">评价老师</label>
                    </div>
                    <div class="radio">
                        <div id="t2" style="display: none;">
                        <label><input type="radio" name="module" id="" value="1" checked="">课堂氛围</label>
                        <label><input type="radio" name="module" id="" value="2" checked="">授课内容</label>
                        <label><input type="radio" name="module" id="" value="3" checked="">教师风格</label>
                        </div>
                        <div id="t1" >
                        <label><input type="radio" name="module" id="" value="1" checked="">课堂表现</label>
                        <label><input type="radio" name="module" id="" value="2" checked="">笔试情况</label>
                        <label><input type="radio" name="module" id="" value="3" checked="">学生特点</label>
                        </div>
					</div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">问题</label>
                        <input type="text" class="form-control" name="content" placeholder="请输入问题">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">选项一</label>
                        <input type="text" class="form-control" name="q1" placeholder="">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">建议一</label>
                        <input type="text" class="form-control" name="a1" placeholder="">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">选项二</label>
                        <input type="text" class="form-control" name="q2" placeholder="">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">建议二</label>
                        <input type="text" class="form-control" name="a2" placeholder="">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">选项三</label>
                        <input type="text" class="form-control" name="q3" placeholder="">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">建议三</label>
                        <input type="text" class="form-control" name="a3" placeholder="">
                    </div>


            </div>
            <div class="modal-footer">
                <button type="submit" class="btn btn-default">提交</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
			</div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/laypage/laypage.js"></script>
<script type="text/javascript" src="/static/js/form-ajax.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.validate.min.js"></script>
<script type="text/javascript">
function toggleSelectAll(self,$sel){
	if(self.checked)
		$sel.each(function(){
			if(!this.checked) $(this).click();
		});
	else{
		$sel.each(function(){
			if(this.checked) $(this).click();
		});
	}
}
function del(id){
	if(confirm('确认删除此记录？'))
	$.post('/user/del',{
		id:id
	},function(data){
		if(data){
			alert('操作成功');location.reload();
		}
		else{
			alert('操作失败')
		}
	},'json');
}
</script>
</body>
</html>